package com.xbongbong.pro.detailtab.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.pro.detailtab.pojo.ExpresssAddressPojo;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * @author feng.zheng
 * @version v1.0
 * @date 2019/2/25 13:57
 * @since v1.0
 */
@Getter
@Setter
public class CustomerExpressSaveDTO extends BaseDTO {
    private static final long serialVersionUID = 684372512933870588L;

    /**
     * 寄送地址id
     */
    private Long id;
    /**
     * 名称
     */
    @Length(max = 100, message = "{dto.msg.customerExpressSave.name.Length}")
    private String name;
    /**
     * 联系人
     */
    @Length(max = 100, message = "{dto.msg.customerExpressSave.contact.Length}")
    private String contact;
    /**
     * 电话
     */
    @Length(max = 100, message = "{dto.msg.customerExpressSave.phone.Length}")
    private String phone;
    /**
     * 邮政编码
     */
    @Length(max = 50, message = "{dto.msg.customerExpressSave.zipCode.Length}")
    private String zipCode;
    /**
     * 地址
     */
    @Valid
    private ExpresssAddressPojo addressJson;
    /**
     * 客户id
     */
    @NotNull(message = "{dto.msg.customerExpressSave.customerId.NotNull}")
    private Long customerId;
}
